Imports Microsoft.VisualBasic

Public Class CSessions
    Inherits System.Web.UI.Page

    Private Sub InitVars()
        If Not IsNothing(Session("Seq_CD")) Then ViewState.Add("Seq_CD", Session("Seq_CD"))
        If Not IsNothing(Session("PolicyNo")) Then ViewState.Add("PolicyNo", Session("PolicyNo"))
        If Not IsNothing(Session("Provider")) Then ViewState.Add("Provider", Session("Provider"))
        If Not IsNothing(Session("CID")) Then ViewState.Add("CID", Session("CID"))
        If Not IsNothing(Session("CName")) Then ViewState.Add("CName", Session("CName"))

        ViewState.Add("UserName", Session("UserName"))
        Session.Clear()
        Session.Add("UserName", ViewState("UserName"))
    End Sub

    Private Sub InitSessions()
        If Not IsNothing(ViewState("Seq_CD")) Then Session.Add("Seq_CD", ViewState("Seq_CD"))
        If Not IsNothing(ViewState("PolicyNo")) Then Session.Add("PolicyNo", ViewState("PolicyNo"))
        If Not IsNothing(ViewState("Provider")) Then Session.Add("Provider", ViewState("Provider"))
        If Not IsNothing(ViewState("CID")) Then Session.Add("CID", ViewState("CID"))
        If Not IsNothing(ViewState("CName")) Then Session.Add("CName", ViewState("CName"))

        ViewState.Clear()
    End Sub
End Class
